Param($assemblyName, $typeName)
[System.Reflection.Assembly]::Load("Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c")
$userCodeService = [Microsoft.SharePoint.Administration.SPUserCodeService]::Local
$proxyOperationType = new-object -typename Microsoft.SharePoint.UserCode.SPProxyOperationType -argumentList $assemblyName, $typeName
$userCodeService.ProxyOperationTypes.Add($proxyOperationType)
$userCodeService.Update()